package com.queue.rabbitmq.listener;

import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;


@Component
public class TopicReceiveListener {

    @RabbitListener(queues = "queue_topic1")
    public void receiveMessage1(String msg) {
        System.out.println("队列1接收到topic的消息：" + msg);
    }


    @RabbitListener(queues = "queue_topic2")
    public void receiveMessage2(String msg) {
        System.out.println("队列2接收到topic的消息：" + msg);
    }


}
